package com.zzyl.mapper;

import com.zzyl.entity.Resource;
import com.zzyl.vo.MenuVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ResourceMapper {

    List<MenuVo> selectMenuByUserId(Long userId);

    List<Resource> findList(String parentResourceNo, String resourceType, String dataState);

    Resource selectById(String parentResourceNo);

    List<Resource> findChildResourceByParentResourceNo(String resourceNo);

    void insert(Resource resource);

    void updateResource(Resource resource);

    Resource selectResourceById(Long id);

    void deleteResource(String menuId);

    void updateResourceDataState(Resource childResource);

    Resource selectResourceByResourceNo(String menuId);

    List<Resource> findALLChildByResourceNo(String resourceNo);

    List<Resource> findResourceListByUserId(Long id);

    Resource findById(Long id);

    int update(Resource resource);

    List<Resource> findChildList(String resourceNo);
}